# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=list-urls
pkgver=0.1
pkgrel=5
url='http://www.whoppix.net/'
pkgdesc='Extracts links from webpage.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
license=('Python')
depends=('python2')
source=('list-urls.py')
arch=('any')
sha512sums=('9ea36f948bb5914912855ee68097b0cbe03aac7f7667aeed308f0bd4fa97fc61cc1a907b4fce629c19425b4f229312e7870931adc421786458aeb8b091ec87a0')

prepare(){
  grep -iRl 'python' "$srcdir" |
  xargs sed -i 's|#!.*/usr/bin/python|#!/usr/bin/python2|;s|#!.*/usr/bin/env python$|#!/usr/bin/env python2|'
}

package() {
  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
}

